<!DOCTYPE html>
<html>
<#include "/views/ftl/base/manager_include.ftl">
<script type="text/javascript" src="${basePath}js/My97DatePicker/WdatePicker.js"></script>
<base href="${basePath}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户列表</title> 
<script type="text/javascript" charset="utf-8" src="ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="ueditor/ueditor.all.min.js"> </script> 
<script type="text/javascript" charset="utf-8" src="ueditor/lang/zh-cn/zh-cn.js"></script> 
</head>
<body style="background:#eef3f7;">
<#include "/views/ftl/base/head.ftl"> 
<div class="Main">
  <div class="dw">
<#include "/views/ftl/base/menu.ftl">
<#function a><#return "新闻分类列表_List"></#function> 

 <!--右边内容-->
      <div class="Rightbox fl">
        <!--面包屑-->
        <div class="Bread_crbs clear">
          <div class="Bread_crbs_img fl"></div>
          <div class="Bread_crbs_text fl"><a href="javascript:void(0);"><span>内容管理</span></a><span class="fnt_famy">></span><a href="javascript:void(0);"><span>内容模块列表</span></a></div>
        </div>
        <!--搜索框-->
        <form action="manager/NewsModules_newsModulesList" method="POST">   
         <span class="fl searchTitle" style="font-size: 14px;color: #333333;">模块名称:</span>
        	<div class="searchBox fl">
          		<div class="search_img fl"></div>
          		<input class="search_text" type="text" name="modulesName" placeholder="请输入模块名称" value="${(modulesName)!''}"/>  
        	</div>
         
			<span class="searchTitle" style="font-size: 14px;color: #333333;">是否显示:</span>
           <select name="isEnable" style="font-size: 14px;color: #333333;">
                 <option value="-1" <#if  requestVo.isEnable??><#if requestVo.isEnable == -1 >selected='true'</#if></#if>>全部</option> 
				 <option value='1' <#if  requestVo.isEnable??><#if requestVo.isEnable == 1 >selected='true'</#if></#if>>显示</option> 
				 <option value='0' <#if  requestVo.isEnable??><#if requestVo.isEnable == 0 >selected='true'</#if></#if>>不显示</option>   
			</select>
       	 <input class="search_btn" type="submit"  style="display: inline;"  value="搜索"/> 
        </form>
        <div class="clear"></div>  
        <!--表格列表-->
        <div class="Table">
          <table id="table" cellpadding="0" cellspacing="1">
            <tbody> 
             <tr id="gl">
             <td>内容版块名称</td>
             <td  style="display:none;">自定义URI</td> 
             <td>创建时间</td> 
             <td>是否显示</td> 
             <td>操作</td> 
              </tr>
         <#if (pager.list??)> 
         <#if ((pager.list?size)>0)>
          <#list pager.list as bean>
     	<tr>
			<td>${(bean.modulesName)!''}</td>
          	<td  style="display:none;">${basePath }xf-m/${(bean.customId)!''}</td> 
          	<td>${(bean.createTime)!''}</td>
           	 	<td>
            		 <#if    bean.isEnable==1 >显示</#if>
           			<#if  bean.isEnable==0 >不显示</#if> 
            	</td>    
            <td class="tbl_btn"> 
            	<a href="manager/NewsModules_editNewsModules?modulesId=${(bean.id)?c}"><span id="editor">编辑</span></a> 
            <a href="javascript:dele(${(bean.id)?c});" onclick="return comfirm()"><span id="delete">删除</span></a>
            </td>
        </tr>
          </#list >
          </#if>
          </#if>
            </tbody>
          </table>
        </div>
     <!--翻页按钮-->
 <#import "../../base/pager.ftl" as p>
 <@p.pager pager = pager baseUrl = "manager/NewsModules_newsModulesList" parameterMap={"isEnable":(requestVo.isEnable)!'','modulesName':(requestVo.modulesName)!''} /> 
      

      </div>
      </div> 
</div>
<script type="text/javascript">
function dele(id){
	$.ajax({ 
		url : "${basePath}manager/NewsModules_deleteNewsModules",
		data : { 
			modulesId : id,	
		}, 
		dataType :"JSON",
		cache : false, 
		type : "POST",
		success : function(dat){
			if(dat.code==1){
				alert(dat.msg);
				location.reload();	 
			} 
			if(dat.code==0){
				alert(dat.msg);	
			} 
		}
	});
}
function comfirm(){
    if(confirm("确认要删除吗?")==false){
     return false;
    }
  }
</script>
</body>
</html>